//package com.spsoft.security.component;
//
//import com.spsoft.core.annotation.AnonymousAccess;
//import org.springframework.beans.BeansException;
//import org.springframework.beans.factory.config.BeanPostProcessor;
//import org.springframework.stereotype.Component;
//
//import java.lang.reflect.Method;
//import java.util.HashMap;
//import java.util.Map;
//
//
///**
// * 权限处理器
// *
// * @author cdl
// * @date 2023/11/09
// */
//@Component
//public class AuthorityBeanPostProcess implements BeanPostProcessor {
//    public static Map<String, AnonymousAccess> map = new HashMap();
//    @Override
//    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
//        Class<?> aClass = bean.getClass();
//        Method[] declaredMethods = aClass.getDeclaredMethods();
//        for (Method method : declaredMethods) {
//            if (method.isAnnotationPresent(AnonymousAccess.class)) {
//                String name = method.getName();
//                AnonymousAccess annotation = method.getAnnotation(AnonymousAccess.class);
//                map.put(name,annotation);
//            }
//        }
//        return bean;
//    }
//}
